home *** CD-ROM | disk | FTP | other *** search
/ World of Video / World of Video.iso / gfxprograms / 3dprograms / rayshade-4.0 / fixes / fix007 < prev    next >
Internet Message Format  |  1995-02-13  |  4KB

  1. From theseas!fs.Princeton.EDU!cek Tue, 27 Apr 93 01:31:38 EET
  2. Received: by kriton.UUCP (V1.16/Amiga)
  3.     id AA00000; Tue, 27 Apr 93 01:31:38 EET
  4. Received: by theseas.ntua.gr with UUCP; Tue, 27 Apr 93 00:37:23 +0300
  5. Received: from mcsun.EU.net by pythia.ics.forth.gr via ITEnet with SMTP;
  6.     id AA10288 (5.65c/FORTH-ICS-3.0-MHS-7.0); Tue, 27 Apr 1993 00:07:22 +0300
  7. Received: by mcsun.EU.net via EUnet
  8.     id AA17990 (5.65b/CWI-2.217); Mon, 26 Apr 1993 23:02:41 +0200
  9. Received: from Princeton.EDU by relay2.UU.NET with SMTP 
  10.     (5.61/UUNET-internet-primary) id AA21952; Mon, 26 Apr 93 16:56:17 -0400
  11. Received: from fs.Princeton.EDU by Princeton.EDU (5.65b/2.96/princeton)
  12.     id AA00648; Mon, 26 Apr 93 16:53:48 -0400
  13. Received: by fs.Princeton.EDU (4.1/1.105)
  14.     id AA12696; Mon, 26 Apr 93 16:53:46 EDT
  15. Received: from faui45.informatik.uni-erlangen.de ([131.188.34.45]) by fs.Princeton.EDU (4.1/1.105)
  16.     id AA12598; Mon, 26 Apr 93 16:52:59 EDT
  17. Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
  18.     id AA04018 (5.65c-5/7.3t-FAU); Mon, 26 Apr 1993 22:52:55 +0200
  19. Received: by immd4.informatik.uni-erlangen.de;
  20.     id AA28920 (5.65c-5/7.3m-FAU); Mon, 26 Apr 1993 22:52:53 +0200
  21. Message-Id: <199304262052.AA28920@faui43.informatik.uni-erlangen.de>
  22. Date: Mon, 26 Apr 93 22:52:53 MDT
  23. X-Mailer: ELM [version 2.3 PL11]
  24. Errors-To: Princeton.EDU!cek
  25. Remailed-Date: Mon Apr 26 16:53:04 EDT 1993
  26. From: "Michael Schroeder (Inf4 - hiwi)" <immd4.informatik.uni-erlangen.de!mlschroe>
  27. To: "Rayshade Distribution List" <cs.Princeton.EDU!rayshade-users>
  28. Subject: blob and shadow bug
  29.  
  30.  
  31. Hello,
  32.  
  33. there is a small bug in the blob intersection code that makes
  34. rayshade miss blob hits if mindist is not zero. This can happen
  35. if a ray to a light source hits a blob. Example:
  36.  
  37. --------------------------------------------------
  38. screen 120 100
  39. light 1 directional -1 0 1
  40. eyep 2 -10 3
  41. lookp 0 0 0
  42.  
  43. surface glass
  44.   diffuse 0 0 .5
  45.   transp 1
  46.   extinct .8
  47.   
  48. blob glass  .2  1 1 0 2 0
  49. box glass -.5 -2.5 -.5  .5 -1.5 .5
  50.  
  51. plane 0 0 -2 0 0 1
  52. plane transp 1 -500 0 0 1 0 0
  53. --------------------------------------------------
  54.  
  55. Patch:
  56.  
  57. *** blob.c.orig    Mon Apr 26 22:10:52 1993
  58. --- blob.c    Mon Apr 26 22:25:01 1993
  59. ***************
  60. *** 250,256 ****
  61.       /* 
  62.        * only interested in stuff in front of ray origin 
  63.        */
  64. !             if (dmin < mindist) dmin = mindist;
  65.               dmax = b + t;
  66.               if (dmax > dmin) /* we have a valid Region */
  67.               {
  68. --- 250,256 ----
  69.       /* 
  70.        * only interested in stuff in front of ray origin 
  71.        */
  72. !             if (dmin < mindist + EPSILON) dmin = mindist + EPSILON;
  73.               dmax = b + t;
  74.               if (dmax > dmin) /* we have a valid Region */
  75.               {
  76.  
  77.  
  78.  
  79. Note that the fully transparent plane is necessary because rayshade
  80. doesn't handle a light source in a medium with nonzero extinction
  81. coefficient. (There is still the problem that the surfaces are not
  82. held on a stack, but that's another story...)
  83. What do you think?
  84.  
  85. *** shadow.c.orig    Mon Apr 26 22:30:52 1993
  86. --- shadow.c    Mon Apr 26 22:32:01 1993
  87. ***************
  88. *** 233,238 ****
  89. --- 233,244 ----
  90.            */
  91.           hitlist.nodes = 0;
  92.       } while (TraceRay(ray, &hitlist, totaldist, &s));
  93. +     if (prevsurf) {
  94. +         if (prevsurf->statten != 1.) {
  95. +             statten = pow(prevsurf->statten, dist - totaldist);
  96. +             ColorScale(statten, res, &res);
  97. +         }
  98. +     }
  99.   
  100.       *result = res;
  101.       return FALSE;
  102.  
  103. Michael.
  104.  
  105. ---------------------------------------------------------------
  106. Michael Schroeder    mlschroe@faui43.informatik.uni-erlangen.de
  107. main(a){while(a=~getchar())putchar(~a-1/(~(a|32)/13*2-11)*13);}
  108.  
  109. ----------
  110. Administrivia: rayshade-request@cs.princeton.edu
  111. Mailing list: rayshade-users@cs.princeton.edu
  112.  
  113.